package com.voute.Model.Impl;

import com.voute.Api.CircleInfoService;
import com.voute.Model.Bean.BaseBean;
import com.voute.Model.Bean.CircleDetailsInfoBean;
import com.voute.Model.Bean.DiscoveryBean;
import com.voute.Model.Bean.SimpleCircleInfoBean;
import com.voute.Model.ICircleModel;
import com.voute.Utils.ServiceFactory;

import rx.Observable;

/**
 * Created by xianke on 22/04/2017.
 */

public class CircleModelImpl implements ICircleModel {
    @Override
    public Observable<SimpleCircleInfoBean> requestCircles(String fid) {
        return ServiceFactory.GetInstance().createService(CircleInfoService.class).requestCircles(fid);
    }

    @Override
    public Observable<DiscoveryBean> requestCircleDetails(String hash_circle, String anchor) {
        return ServiceFactory.GetInstance().createService(CircleInfoService.class).requestCircleDetails(hash_circle,anchor);
    }

    @Override
    public Observable<CircleDetailsInfoBean> requestCircleBaseInfo(String hash_circle) {
        return ServiceFactory.GetInstance().createService(CircleInfoService.class).requestCircleBaseInfo(hash_circle);
    }

    @Override
    public Observable<BaseBean> JoinCircle(String hash_circle) {
        return ServiceFactory.GetInstance().createService(CircleInfoService.class).JoinCircle(hash_circle);
    }

    @Override
    public Observable<BaseBean> ExitCircle(String hash_circle) {
        return ServiceFactory.GetInstance().createService(CircleInfoService.class).ExitCircle(hash_circle);
    }
}
